package day_2022_12_to_3.year2023;

/**
 * @author haomin
 * @date 2023/01/06 23:44
 **/
public class Day1_6_Num2032 {
    class Solution {
        public int countEven(int num) {
            int ans = 0;
            while(num > 0) {
                int temp = num;
                int sum = 0;
                while(temp != 0) {
                    sum += temp % 10;
                    temp /= 10;
                }
                ans += sum % 2 == 0 ? 1 : 0;
                num--;
            }
            return ans;
        }
    }
}